package com.xingdata.jjxc.utils;

import android.content.Context;
import android.net.ConnectivityManager;

/**
 * 网络工具类
 * @author Administrator
 *
 */
public class NetworkTools {
	
	/** 判断当前是否有网络 */
	public static boolean isNetAvailable(Context context) {
		ConnectivityManager cwjManager = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		if (cwjManager.getActiveNetworkInfo() != null)
			return cwjManager.getActiveNetworkInfo().isAvailable();
		return false;
	}

}
